<? FoundryView::includeTpl( 'adminMain:headerPopup' ) ?>

<script type="text/javascript" src="<?=Foundry::config('webpath')?>/javascript/admin/editToolBar.js"></script>
<script type="text/javascript" src="<?=Foundry::config('webpath')?>/javascript/admin/imageBucketRules.js"></script>

<div id="mainContent">

<?php 
	$image = $this->data['image'];
?>

<div id="cropImageBox" style="background-image: url(<?=$image->filePath?><?=$image->name?> );"><span id="resizeTest" onclick="resizeTest();" style="background:#FFF;">eep!</span></div>
<div id="cropImageBase"></div>
<img src="<?=$image->filePath?><?=$image->name?>" alt="<?=$image->name?>" id="cropImage" for="<?=$image->uid?>" />

</div>

<script type="text/javascript">
	var height = $('cropImage').offsetHeight;
	var width = $('cropImage').offsetWidth;
	
	$('cropImageBase').style.width = width+'px';
	$('cropImageBase').style.height = height+'px';
	
	new Draggable( 'cropImageBox' );
	
	function resizeTest()
	{
		new Effect.MoveAndResizeTo( 'cropImageBox', 0, 0, 400, 400 );
	}
</script>

<? FoundryView::includeTpl( 'adminMain:footer' ) ?>